package br.odonto.entities;

import java.util.Date;
import java.util.Collection;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.Cascade;
import org.hibernate.annotations.CascadeType;
@Entity
@Table(name="agenda")
public class Agenda {
	@Id
	@GeneratedValue
	private int id;
	@OneToMany(mappedBy="agenda")
	@Cascade(CascadeType.ALL)
	private Collection<Consulta> consulta;
	@Temporal(TemporalType.DATE)
	private Date data;
	
	public Agenda() {
		// TODO Auto-generated constructor stub
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public Collection<Consulta> getConsulta() {
		return consulta;
	}

	public void setConsulta(Collection<Consulta> consulta) {
		this.consulta = consulta;
	}

	public Date getData() {
		return data;
	}

	public void setData(Date data) {
		this.data = data;
	}
	
	

}
